var sqlCon = require('../mysql/index');
var Mapper = require('../mysql/seque');

async function insertStep(x, y, type, userid, roomid) {
   var result = await Mapper.Step.create({x, y, type, userid, roomid});
   return result.toJSON();
};

async function selectSteps(roomid) {
  var result = await Mapper.Step.findAll({
    where: {
      roomid
    }
  });
  return result;
}

module.exports = {
  insertStep,
  selectSteps
}